import React from "react";
import ReactDOM from "react-dom";
import "./index.css";
import App from "./App";
import registerServiceWorker from "./registerServiceWorker";
import VideoList from "./Home/Home";
import { BrowserRouter,HashRouter, Route, Link } from "react-router-dom";
import config from './config'


// import Home from './Home'


// const getConfirmation = () => {
//     // window.confirm('Are you sure?')
//   }
// const App = () => (
//     <BrowserRouter
//       forceRefresh={false}
//       getUserConfirmation={getConfirmation()}
//       keyLength={12}
//       >
//       <div>
//         <Route exact strict path="/" component={Home}/>
//         <Route exact strict path="/mine" component={Mine}/>
//       </div>
//     </BrowserRouter>
//   )

// const Home = (props) => {
//   console.log(props); 
//   return (
//     <div className="homepage">
//       <h1 onClick={()=>{props.history.push('/mine')}}>Home Page</h1>
//       <Link to="/mine">跳到我的</Link>
//     </div>
   
//   )
// }

// const Mine=()=>{
//     return <h1>我的</h1>
// }

// ReactDOM.render(<App />, document.getElementById("root"));
// registerServiceWorker();

// const BPP = () => (
//     <BrowserRouter
//       forceRefresh={false}
//       getUserConfirmation={getConfirmation()}
//       keyLength={12}
//       >
//       <div>
//         <Route exact  path="/" component={Home}/>
//         <Route exact  path="/mine" component={Mine}/>
//       </div>
//     </BrowserRouter>
//   )

ReactDOM.render(
    <HashRouter >
    <div> 
        <Route exact path="/" component={App}/>
        <Route  path="/list" component={VideoList}/>
     </div>
     </HashRouter>
    , document.getElementById('root'));
registerServiceWorker();

